<?php
/*
 * mk script created on 13-mag-2005
 * jaco_at_pixeldump_dot_org
 * "holed" shapes and fillstyles
 */

include("sample_utils.php");                // provides some utils and using mk

$sc = new MKShapeContainer();             // the shape

$maxIteration = 30;

for($i = 0; $i < $maxIteration; $i++){
	$x = $i * 20;
	$y = cos(deg2rad($x)) * 80 + 100;
	trace_var($y, "Y");
	$sc->clear_fillStyle();                 // prepare to draw
	$sc->add_fillStyle_solid("#FF9900");    // fill color, orange
	$sc->add_circle(9, $x, $y);             // a circle with radius, x,y
	$sc->select_fill(LEFT_FILL);            // prepare to draw hole
	$sc->add_circle(3, $x, $y);             // a circle with radius, x,y
}

$sd = $sc->update_tagData();                // get shape tag
$po = $sc->update_place_tagData();          // get placing data

$swf = new MKSwf("test_draw02.swf");        // start a fresh swf
$swf->set_swfDir(SERVER_MKTMP);             // change default working dir
$swf->add_tagData($sd);                     // populate with shape
$swf->add_tagData($po);                     // place on stage
$swf->swf_output();                         // save to disk

$swfHeader = $swf->fetch_assoc();           // get swf header info

$str = render_swf_box($swfHeader, $imgDir, false);
$str .= "<br/><strong>test_draw02.swf created in" .SERVER_MKTMP ."</strong>";
echo show_content($str, basename(__FILE__));
?>
